package service;

import util.StringUtil;
import dao.TaskDao;
import entity.Goal;
import entity.Task;
import entity.User;

public class New_TaskService {
	private TaskDao dao=new TaskDao();
	
	public void save(String id,String t_name,String start_time,String end_time,String description,String state,String level,String rate,String createtime,String user_id,String goal_id){	
		
		Task tk=new Task();
		Goal goal=new Goal();
		User user=new User();
		
		tk.setDescripion(description);
		tk.setEnd_time(end_time);
		tk.setGoal_id(goal.getId());
		tk.setId(StringUtil.getUUID());
		tk.setLevel(level);
		tk.setName(t_name);
		tk.setRate(rate);
		tk.setStart_time(start_time);
		tk.setState(state);
		tk.setUser_id(user.getId());
		
		dao.save(tk);
		
	}
}
